import { createSlice } from '@reduxjs/toolkit';
const citySlice = createSlice({
    name: "cityer",
    initialState: {
        city: "武汉"
    },
    reducers: {
        changeCity: (state, action) => {
            console.log(action.payload);
            state.city = action.payload;
        }
    }
})

export const { changeCity } = citySlice.actions;
export const selectCity = state => state.cityer.city;
export default citySlice.reducer;